package com.deft.design.visitor.visitor.impl;

import com.deft.design.visitor.user.impl.Student;
import com.deft.design.visitor.user.impl.Teacher;
import com.deft.design.visitor.visitor.Visitor;
import lombok.extern.slf4j.Slf4j;

/**
 * @author Hide丶love
 * @date 2022/05/30
 **/
@Slf4j
public class Parent implements Visitor {

    @Override
    public void visit(Student student) {
        log.info("学生信息 姓名：{} 班级：{}", student.getName(), student.getClazz());
    }

    @Override
    public void visit(Teacher teacher) {
        log.info("老师信息 姓名：{}  班级：{}  升学率：{}", teacher.getName(), teacher.getClazz(), teacher.entranceRatio());
    }
}
